//
//  SuperADLib.h
//  SuperADLib
//
//  Created by mac on 2025/5/19.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ADSDK.h"

@interface SuperADLib : NSObject

+ (SuperADLib *_Nonnull)shared;

/*需要传入的值：
{"version":"xxx","package_id":"xxx","uuid":"xxx"}
 */
- (void)loadAdsWithDatas:(NSDictionary *_Nonnull)dic complete:(void(^_Nonnull)(BOOL result))complete;
/*remote传入的值：
 {"advertising":"","get_config":"xxx",""}直接获取到的字符串
 */
- (void)loadRemoteDatas:(NSDictionary *_Nonnull)dic;

// 重新加载广告数据
- (void)reloadAdsDatas;

/*展示banner
 vc 广告要加载的控制器
 toBottom 距离底部距离
 completed 回调加载结果 result 0 失败 1 成功
 */
- (void)showBannerAdWithVC:(nonnull UIViewController *)vc toBottom:(CGFloat)toBottom complete:(void(^_Nonnull)(BOOL result))completed;

/* 展示open
 vc 广告要加载的控制器
 completed 回调加载结果 result 0 失败 1 成功
 */
- (void)showOpenAdAt:(UIViewController *_Nonnull)vc complete:(void(^_Nonnull)(BOOL result))completed;
/* 展示insert
 vc 广告要加载的控制器
 completed 回调加载结果 result 0 失败 1 成功
 */
- (void)showInsertAdAt:(UIViewController *_Nonnull)vc complete:(void(^_Nonnull)(BOOL result))completed;
/* 展示reward
 vc 广告要加载的控制器
 completed 回调加载结果 result 0 失败 1 成功
 */
- (void)showRewardAdAt:(UIViewController *_Nonnull)vc complete:(void(^_Nonnull)(BOOL result))completed;
/* 展示native
 targetView 相对view的，例如距顶部view
 position   native与相对view的位置关系 top：顶部距targetview底部 bottom：底部距targetview顶部
 offset     与相对view的位置距离  CGPoint(0,100)
 size       native的size
 vc         广告要加载的控制器
 completed 回调加载结果 result 0 失败 1 成功
 */
- (void)showNativeADReference:(UIView *_Nonnull)targetView
                     position:(ADPosition)position
                       offset:(CGPoint)offset
                         size:(CGSize)size
                           vc:(UIViewController *_Nonnull)vc
                    completed:(void(^_Nonnull)(BOOL result))complete;

@end
